package com.ruoyi.bigScreen;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import com.ruoyi.common.core.domain.zzw.TServerManage;
import com.ruoyi.common.core.domain.zzw.VO.TServerManageListVO;
import com.ruoyi.common.core.domain.zzw.VO.loadCountVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.service.ITServerManageService;
import com.ruoyi.common.utils.poi.ExcelUtil;

/**
 * 【请填写功能名称】Controller
 * 
 * @author xbx
 * @date 2023-10-20
 */
@RestController
@RequestMapping("/screen/manage")
@Api(tags = "服务器管理")
public class ScreenManageController extends BaseController
{
    @Autowired
    private ITServerManageService tServerManageService;

    /**
     * 查询【请填写功能名称】列表
     */
    @ApiOperation(value = "获取服务器列表")
//    @PreAuthorize("@ss.hasPermi('system:manage:list')")
    @GetMapping("/list")
    public AjaxResult list(TServerManage tServerManage)
    {
        List<TServerManageListVO> list = tServerManageService.selectTServerManageList(tServerManage);
        return success(list);
    }


    /**
     * 统计服务器低中高负载数量
     */
    @ApiOperation("统计服务器低中高负载数量")
    @GetMapping(value = "/loadCount")
    public AjaxResult loadCount(){
        List<loadCountVO> vo=  tServerManageService.loadCount();
        return AjaxResult.success(vo);
    }
}
